package laspon.vvvlike.school.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import laspon.vvvlike.school.dto.BaseResponse;
import laspon.vvvlike.school.dto.resquse.AdminAccountDto;
import laspon.vvvlike.school.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author by xqcw9 on 2020/9/11 14:41
 */

@RequestMapping("/AdminController")
@Api(tags = "管理员后台管理相关接口")
@RestController
public class AdminController {

    private AdminService adminService;

    @Autowired
    public void setAdminService(AdminService adminService) {
        this.adminService = adminService;
    }

    @ResponseBody
    @PostMapping(value = "/adminAccount")
    @ApiOperation(value = "admin表用户操作", notes = "admin表用户操作")
    public BaseResponse adminAccount(@RequestBody AdminAccountDto adminAccountDto) {
        return adminService.adminAccount(adminAccountDto);
    }
}
